import request from '@/utils/request'

const api_name = '/admin/user'

// 分页列表
export const GetUserListByPage = (pageNum, pageSize, queryDto) => {
  return request({
    url: `${api_name}/page`,
    method: 'post',
    data: {
      pageNum,
      pageSize,
      ...queryDto,
    },
  })
}

// 查看用户详情
export const ShowUserDetails = id => {
  return request({
    url: `${api_name}/findUserDetailByUserId/${id}`,
    method: 'get',
  })
}

//停用或启用用户
export const StopOrStartUser = (id, status) => {
  return request({
    url: `${api_name}/makeUserStatusStopById/${id}/${status}`,
    method: 'put',
  })
}
